package thread;

import java.util.ArrayList;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * Created by User on 2017/12/21.
 */
public class OSCQQ {
    public static void main(String[] args) {

        String s = "select * from user where id =? and ( email= ? || phone=?) and password=? and user_status =?";

        Pattern pattern = Pattern.compile("([\\w]+) ?= ?\\?");

        Matcher matcher = pattern.matcher(s);

        while (matcher.find()) {
            System.out.println(matcher.group());
        }

        List  list = new ArrayList();

        String join = String.join(";", list);
        System.out.println(join);

    }
}
